<template>
  <div class="returns" ref="homePage">
    <div class="bj">
      <van-nav-bar title="退货详情" style="background: #68c5ba;width: 100%;">
        <van-icon name="arrow-left" slot="left" color="#FFFFFF" @click="mine" />
      </van-nav-bar>
    </div>
    <div style="width: 100%;height: 46px;"></div>
    <div class="returns_content">
      <p class="status">状态</p>
      <div class="requiredReason">
        <span>请选择理由：</span>
        <p class="Selected" v-model="Selected" @click="SelectedYes">{{Selected}}</p>
      </div>
      <van-popup v-model="status_show" position="bottom">
        <van-picker show-toolbar :columns="columns" @cancel="onCancel" @confirm="onConfirm" />
      </van-popup>
    </div>
  </div>
</template>

<script>
  import {
    OrderDetails
  } from '@/api/home.js'
  export default {
    data() {
      return {
        status_show:false,
        Selected:'请选择理由',
        clintHeigth: '', //获取页面高度
        data: {},
        columns: ['不想要了/买错了', '其它']
      }
    },
    mounted() {
      this.clientHeight = `${document.documentElement.clientHeight}` //document.body.clientWidth;
      // console.log(this.clientHeight);
      // let dd = 100;
      this.$refs.homePage.style.minHeight = this.clientHeight + 'px';

    },
    methods: {
      onConfirm(value, index) {
        this.Selected = value
        this.status_show = false
        // this.$toast(`当前值：${value}, 当前索引：${index}`);
      },
      onCancel() {
        this.status_show = false
        // Toast('取消');
      },
      SelectedYes(){
        this.status_show = true
      },
      mine() {
        this.$router.go(-1);
      },


    }
  }
</script>

<style lang="scss">
  .returns {
    background: white;

    .bj {
      .van-icon {
        color: white !important;

      }
    }

    .returns_content {
      .status {
        width: 100%;
        height: 100px;
        text-align: center;
        line-height: 100px;
        font-size: 20px;
      }
      .requiredReason{
        width: 100%;
        display: flex;
        font-size: 16px;
        align-items: center;
        justify-content: center;
        .Selected{
          width: 70%;
          height: 40px;
          font-size: 16px;
          line-height: 40px;
          padding-left: 5px;
          border: 1px solid #b2b1b1;
        }
      }

    }
  }
</style>
